package com.dataease.indicatorqa.model;

import lombok.Data;

import java.util.List;
import java.util.Map;

@Data
public class DatasetDetailResponse {
    private Integer code;
    private String msg;
    private DatasetDetailData data;
    
    @Data
    public static class DatasetDetailData {
        private String id;
        private String name;
        private String pid;
        private Integer level;
        private String nodeType;
        private String type;
        private Integer mode;
        private String info;
        private String createBy;
        private String orgId;
        private Long createTime;
        private String qrtzInstance;
        private String syncStatus;
        private String updateBy;
        private Long lastUpdateTime;
        private String unionSql;
        private List<Object> union;
        private Object sortFields;
        private DatasetData data;
        private List<DatasetField> allFields;
        private String sql;
        private Object total;
        private String creator;
        private String updater;
    }
    
    @Data
    public static class DatasetData {
        private List<DatasetField> fields;
        private List<Map<String, Object>> data;
    }
    
    @Data
    public static class DatasetField {
        private String id;
        private String datasourceId;
        private String datasetTableId;
        private String datasetGroupId;
        private String chartId;
        private String originName;
        private String name;
        private String dbFieldName;
        private String description;
        private String dataeaseName;
        private String groupType; // "d" 维度, "q" 指标
        private String type;
        private Object precision;
        private Object scale;
        private Integer deType;
        private Integer deExtractType;
        private Integer extField;
        private Boolean checked;
        private Object columnIndex;
        private Object lastSyncTime;
        private Object dateFormat;
        private Object dateFormatType;
        private String fieldShortName;
        private Object desensitized;
        private Object params;
    }
}